import { ModalProps } from 'antd';
import { ColumnType } from 'antd/es/table/interface';

import type * as React from 'react';
import {
  DescriptionListProps,
  DescriptionProps,
} from '@/biz-components/slice-file-upload/modal/description-list/interface';

export type ImgSrc = string | string[];

export type Key = React.Key;

export type DataIndex = string | number | readonly (string | number)[];

export type DataItem = {
  imgSrc: ImgSrc;
  [key: string]: any;
};

export interface ColumnsItem extends ColumnType<any> {
  descriptionProps?: DescriptionProps;
}

export interface ViewDialogProps extends ModalProps {
  index: number;
  columns: ColumnsItem[];
  dataSource: DataItem[];
  descriptionListProps?: DescriptionListProps;
}

export interface SeeTableViewProps {
  dialogProps: Pick<ViewDialogProps, 'index' | 'columns' | 'dataSource' | 'title'>;
}
